#pragma once

#include "stdafx.h"
#include "globalMessage.h"
#include "bitmap.h"
#include "stdBulletLib.h"
#include "emeny.h"
#include "Boss.h"

class Bullet
{
public:
	Bullet();
	/*Bullet(stdBullet std, Point p);
	Bullet(stdBullet std, Point p, Point* play);
	Bullet(stdBullet std, Point p, Point* play, int angle);*/
	void setInformation(stdBullet std, Point p);
	void setInformation(stdBullet std, Point p, Point* play);
	void setInformation(stdBullet std, Point p, Point* play, int angle);
	void setInformation(stdBullet std, Point p, Point* play, int angle, int effect, Point* round);
	void draw();
	void updata();
	Point getNowPoint()
	{
		return _std.bitmap.p;
	}
	float getRange()
	{
		return _std.bitmap.range;
	}
	bool checkRemove()
	{
		return _reMove;
	}
	void changeRemove()
	{
		_reMove = true;
	}
	void setRound(Point* p)
	{
		roundPoint = p;
	}
	void checkHit(Emeny& e);
	void checkHit(Boss& e);
protected:
private:
	inline bool checkNextMessage();
	inline void gameUpdata();
	inline void gameDraw();
	inline void initDraw();
	inline void initUpdata();
	inline void checkOut();
	inline void checkRound();
	inline void calcSpd();
	inline void calcSpd(int i);
	inline void calcSpd(emenyMessage* m);
	inline void move();
	inline void sumSpd();
	inline void calcPoint();
	bool readFormVector(int time)
	{
		return nowFps == time;
	}
	int _angle;
	stdBullet _std;
	bool _reMove;
	bool _round;
	int nextFps;
	int nextBulletFps;
	int nowFps;
	int nowRead;
	int nowReadBullet;
	int nowDraw;
	int coumt;
	bool waitingFlag;
	bool _Rotate;
	float vx,vy;
	float ax,ay;
	float _rotate;
	bool init;
	bool follow;
	float alpha;
	Point* playPoint;
	Point* roundPoint;
	emenyMessage* _m;
};